#!/usr/bin/expect

spawn build/bin/observer -f etc/observer.ini -P cli 
expect "miniob >"
send "drop table t_order_by;\r"
expect "miniob >"
send "drop table t_order_by_2;\r"
expect "miniob >"
send "create table t_order_by(id int, score float, name char(4));\r"
expect "miniob >"
send "create table t_order_by_2(id int, age int);\r"
expect "miniob >"
send "insert into t_order_by values(3, 1.0, 'a');\r"
expect "miniob >"
send "insert into t_order_by values(1, 2.0, 'b');\r"
expect "miniob >"
send "insert into t_order_by values(4, 3.0, 'c');\r"
expect "miniob >"
send "insert into t_order_by_2 values(413, 434);\r"
expect "miniob >"
send "insert into t_order_by_2 values(34, 523);\r"
expect "miniob >"
send "insert into t_order_by_2 values(66, 65467);\r"
expect "miniob >"
send "select * from t_order_by, t_order_by_2;\r"
expect "miniob >"
send "select * from t_order_by,t_order_by_2 order by t_order_by.id,t_order_by.score,t_order_by.name,t_order_by_2.id,t_order_by_2.age;\r"
interact
